package net.sky.oa.test.dao.talkpark;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

import net.sky.oa.dao.talkpark.TalBoxUserDao;
import net.sky.oa.model.TalBoxUser;
import net.sky.oa.test.BaseTestCase;

public class TalBoxUserDaoTestCase extends BaseTestCase {

	@Resource
	private TalBoxUserDao talboxuserdao;
	
	@Test
	@Rollback(false)
	public void save()
	{
		TalBoxUser talboxuser=new TalBoxUser();
		 talboxuser.setBox(null);
		 talboxuser.setIsread(1);
		 talboxuser.setReadtime(new Date());
		 talboxuser.setStatus(1);
		 talboxuser.setUser(null);
		 this.talboxuserdao.save(talboxuser);
	}
	
	@Test
	@Rollback(false)
	public void list()
	{
		List<TalBoxUser> list=this.talboxuserdao.findAllTalboxUser();
		for(TalBoxUser talboxuser :list)
		{
			System.out.println("result: "+talboxuser.getStatus());
		}
	}
}
